
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-simulation"></use>
                    </svg>
                    <div class="name">模拟考试</div>
                    <div class="fontclass">#icon-simulation</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sequence"></use>
                    </svg>
                    <div class="name">顺序练习</div>
                    <div class="fontclass">#icon-sequence</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icondanxuanxiangweixuanze"></use>
                    </svg>
                    <div class="name">icon_单选项未选择</div>
                    <div class="fontclass">#icon-icondanxuanxiangweixuanze</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shoucang1"></use>
                    </svg>
                    <div class="name">收 藏</div>
                    <div class="fontclass">#icon-shoucang1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-consciousness"></use>
                    </svg>
                    <div class="name">意识问题</div>
                    <div class="fontclass">#icon-consciousness</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tianchongxuanxiangkuangqueding"></use>
                    </svg>
                    <div class="name">填充选项框(确定)</div>
                    <div class="fontclass">#icon-tianchongxuanxiangkuangqueding</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-exam"></use>
                    </svg>
                    <div class="name">考试</div>
                    <div class="fontclass">#icon-exam</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconxuanxiangkuang"></use>
                    </svg>
                    <div class="name">icon-选项框</div>
                    <div class="fontclass">#icon-iconxuanxiangkuang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhengque"></use>
                    </svg>
                    <div class="name">正确</div>
                    <div class="fontclass">#icon-zhengque</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-heartword"></use>
                    </svg>
                    <div class="name">心里焦虑测评s</div>
                    <div class="fontclass">#icon-heartword</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhengque1"></use>
                    </svg>
                    <div class="name">正确</div>
                    <div class="fontclass">#icon-zhengque1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-right"></use>
                    </svg>
                    <div class="name">正确</div>
                    <div class="fontclass">#icon-option-right</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-a"></use>
                    </svg>
                    <div class="name">选项a-多选</div>
                    <div class="fontclass">#icon-option-a</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-c"></use>
                    </svg>
                    <div class="name">选项c-多选</div>
                    <div class="fontclass">#icon-option-c</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-d"></use>
                    </svg>
                    <div class="name">选项d-多选</div>
                    <div class="fontclass">#icon-option-d</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-b"></use>
                    </svg>
                    <div class="name">选项b-多选</div>
                    <div class="fontclass">#icon-option-b</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-a-select"></use>
                    </svg>
                    <div class="name">选项a-多选-填充</div>
                    <div class="fontclass">#icon-option-a-select</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-b-select"></use>
                    </svg>
                    <div class="name">选项b-多选-填充</div>
                    <div class="fontclass">#icon-option-b-select</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-c-select"></use>
                    </svg>
                    <div class="name">选项c-多选-填充</div>
                    <div class="fontclass">#icon-option-c-select</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-d-select"></use>
                    </svg>
                    <div class="name">选项d-多选-填充</div>
                    <div class="fontclass">#icon-option-d-select</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-rank"></use>
                    </svg>
                    <div class="name">排名</div>
                    <div class="fontclass">#icon-rank</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-lianxi"></use>
                    </svg>
                    <div class="name">练习</div>
                    <div class="fontclass">#icon-lianxi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shenghuo"></use>
                    </svg>
                    <div class="name">生活</div>
                    <div class="fontclass">#icon-shenghuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mutil"></use>
                    </svg>
                    <div class="name">多选题</div>
                    <div class="fontclass">#icon-mutil</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mistakebook"></use>
                    </svg>
                    <div class="name">错题本</div>
                    <div class="fontclass">#icon-mistakebook</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-danxuan"></use>
                    </svg>
                    <div class="name">单选题</div>
                    <div class="fontclass">#icon-danxuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bodygood"></use>
                    </svg>
                    <div class="name">身体健康</div>
                    <div class="fontclass">#icon-bodygood</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sate_edu"></use>
                    </svg>
                    <div class="name">83安全教育</div>
                    <div class="fontclass">#icon-sate_edu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-judge"></use>
                    </svg>
                    <div class="name">判断题</div>
                    <div class="fontclass">#icon-judge</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-wrong"></use>
                    </svg>
                    <div class="name">错误、关闭、取消-线性方框</div>
                    <div class="fontclass">#icon-option-wrong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-notebook"></use>
                    </svg>
                    <div class="name">手册</div>
                    <div class="fontclass">#icon-notebook</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xuanxiang_yixuanzeicon"></use>
                    </svg>
                    <div class="name">选项_已选择icon</div>
                    <div class="fontclass">#icon-xuanxiang_yixuanzeicon</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-option-right-"></use>
                    </svg>
                    <div class="name">正确-2</div>
                    <div class="fontclass">#icon-option-right-</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weibiaoti-"></use>
                    </svg>
                    <div class="name">ZHX_正确</div>
                    <div class="fontclass">#icon-weibiaoti-</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shoucang"></use>
                    </svg>
                    <div class="name">收 藏</div>
                    <div class="fontclass">#icon-shoucang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ZHX_zhengque"></use>
                    </svg>
                    <div class="name">ZHX_正确</div>
                    <div class="fontclass">#icon-ZHX_zhengque</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shoucang11"></use>
                    </svg>
                    <div class="name">收 藏</div>
                    <div class="fontclass">#icon-shoucang11</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
